from fastapi import APIRouter, Security
from package.fastapi import permission


router_heartbeat = APIRouter(prefix='/heartbeat', tags=['heartbeat'])
router_meta = {'module': 'Heartbeat', 'sub_module': 'heartbeat'}


@router_heartbeat.get('/', openapi_extra=router_meta, name='heartbeat_get', summary='心跳检测')
def heartbeat_get():
    return {}


@router_heartbeat.get('/authorization', openapi_extra=router_meta, name='heartbeat_authorization_get',
                      summary='认证心跳检测')
def heartbeat_authorization_get(user=Security(permission.security, scopes=[])):
    return {}
